package com.bbx.taxi.client.Task;

import android.app.Activity;

import com.bbx.androidapi.util.ToastUtil;
import com.bbx.api.sdk.model.passanger.CancelOrder;
import com.bbx.api.sdk.model.passanger.CodeBuild;
import com.bbx.api.sdk.net.base.BaseNetwork;
import com.bbx.api.sdk.net.passeger.conn.CancelOrderNet;
import com.bbx.api.sdk.net.passeger.conn.CodeNet;
import com.bbx.taxi.client.Bean.Message.ObserverListener;
import com.bbx.taxi.client.MyApplication;
import com.bbx.taxi.client.R;

/**
 * 作者：严旭文 on 2016/12/29 10:43
 * 邮箱：420255048@qq.com
 * 验证码
 */
public class MyCodeTask extends BaseTask{
    public ObserverListener.DATA_TYPE TYPE= ObserverListener.DATA_TYPE.CODE;
    private CodeBuild mCodeBuild;
    public MyCodeTask(Activity context,String phone) {
        super(context);
        mCodeBuild=new CodeBuild(context);
        mCodeBuild.phone=phone;
    }
    @Override
    public boolean isShow() {
        return true;
    }

    @Override
    public boolean isReturnString() {
        return false;
    }
    @Override
    public boolean condition() {
        // TODO Auto-generated method stub
        return true;
    }
    @Override
    public void request() {
        setType(TYPE,mCodeBuild);
    }
    @Override
    public void success(int status,Object object) {
        // TODO Auto-generated method stub

    }
    @Override
    public void failed(int status, String msg,String message) {
        ToastUtil.showToast(context,message);
    }
    @Override
    public BaseNetwork getBaseNetwork() {
        return new CodeNet(context);
    }
}
